package com.chixing.day03_oop.work;

public class Work1 {
    public static void main(String[] args) {
        //二维数组行列数量
        int row=8;
        //1.定义一个8*8的二维数组
        int[][] arr=new int[row][row];
        for (int i = 0; i < row; i++) {
            for (int j = 0; j <= i ; j++) {
                if(j == 0 || j == i)
                    arr[i][j]=1;
                else
                    arr[i][j]=arr[i-1][j]+arr[i-1][j-1];
                System.out.print(arr[i][j]+" ");
            }
            System.out.println();
        }
    }
}
